var testConfig = require('../testConfig');
function TestProject() {
  this.init = function () {
    var arr = [];
    arr.push(
      this.step1,
      this.step2,
      this.step3,
      this.step4,
      this.step5,
      this.step6,
      this.step7,
      this.step8,
      this.step9,
      this.step10
    );
    testConfig.testFun.runStep(arr);
  };
  this.step1 = function () {
    $("#aside-nav").find("div.coords").eq(5).find("a")[0].click();
  };
  this.step2 = function () {
    $("#collapse6").find("li:nth-child(3)")[0].click();
  };
  this.step3 = function () {
    testConfig.testFun.ai().find("#project-class>.titleCon").eq(0).find("a:first")[0].click();
  };
  this.step4 = function () {
    var l = testConfig.testFun.ai().find("#collapse1 .titleCon:last input").length - 1;
    var el = testConfig.testFun.ai().find("#collapse1 .titleCon:last input").eq(l);
    var ve = testConfig.testFun.ai().find("#project-class")[0].__vue__;
    ve.addClass("测试材料5", 1, el);
  };
  this.step5 = function () {
  };
  this.step6 = function () {
    var l = testConfig.testFun.ai().find("#collapse1>.titleCon").length - 2;
    testConfig.testFun.ai().find("#collapse1>.titleCon").eq(l).find("a")[0].click();
  };
  this.step7 = function () {
    var cid = testConfig.testFun.ai().find("#collapse1 .in:last").attr("id");
    var el = testConfig.testFun.ai().find("#collapse1 .in:last>.titleCon:last input");
    var ve = testConfig.testFun.ai().find("#project-class")[0].__vue__;
    var value = cid.replace(/[^0-9]/ig, "");
    ve.addClass("测试材料51", value, el);
  };
  this.step8 = function () {
    var l = testConfig.testFun.ai().find("#collapse1>.in>.titleCon").length-2;
    testConfig.testFun.ai().find("#collapse1>.in>.titleCon").eq(l).find("a")[0].click();
  };
  this.step9 = function () {
    var cid = testConfig.testFun.ai().find("#collapse1 .in:last").attr("id");
    var el = testConfig.testFun.ai().find("#collapse1 .in:last>.titleCon:last input");
    var ve = testConfig.testFun.ai().find("#project-class")[0].__vue__;
    var value = cid.replace(/[^0-9]/ig, "");
    ve.addClass("测试材料52", value, el);
  };
  this.step10 = function () {
    var l=testConfig.testFun.ai().find("#collapse1 .titleCon").length-4;
    testConfig.testFun.ai().find("#collapse1 .titleCon").eq(l).find("input").click();
  };
}
function testStart() {
  var test = new TestProject();
  test.init();
}
exports.start = testStart;
